import { ISingerItem, ISongItem } from "@/fetch/type"
import { useRouter } from "vue-router"


export const useDetail = () => {
  const router = useRouter()

  // 跳转歌单页面
  const goSongDetail = (item: ISongItem) => {
    router.push({ path: '/main/song-detail', query: { ...item } })
  }

  // 跳转歌手页面
  const goSingerDetail = (item: ISingerItem) => {
    router.push({ path: '/main/singer-detail', query: { ...item } })
  }
  return {
    goSingerDetail,
    goSongDetail
  }
}
